import Sprite from '../base/sprite'
import { screenWidth, screenHeight } from '../../constant/index'
import { getCloudUrl } from '../../utils'


const BG_IMG_SRC =  getCloudUrl('images/bg.jpg')

/**
 * 游戏背景类
 */
export default class CustomBg extends Sprite {
  constructor() {
    super(BG_IMG_SRC, screenWidth, screenHeight)
  }
  setSrc (src) {
    this.img.src = src
  }
  render(ctx) {
    // ctx.drawImage(
    //   this.img,
    //   this.x,
    //   this.y,
    //   this.width,
    //   this.height
    // )
  }
}
